
event_on=1;
event_off=0;

class Event():
	def __init__(self):
		self.state=event_off
		callbacks = []
	
	def consume(self):
		self.state=event_off
	
	def emit(self):
		self.state=event_on
		for cb in callbacks:
			cb()
	
	def register_callback(cb):
		callbacks.append(cb)




